package fsaf;

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class  {
    public static void main(String[] args) throws Exception {
          String path = "1.txt";
          Pattern p = Pattern.compile("[0]{3}\\w{4}[0]{3}");
          FileReader fr = new FileReader(path);
          BufferedReader br = new BufferedReader(fr);
         // System.out.println(br.read());
          String str="";
          String st ="";
          while((st = br.readLine()) != null) {
              str+=st+"\n";
          }
        Matcher m=p.matcher(str);
        while(m.find()){
            String str1=m.group();
            String str2="from DB find By id's Data";
            String ss=str.replace("<!--"+str1+"-->",str2);
            System.out.println(ss);
        }
    }
}
